package com.thoughtworks.opensource.yui.dd.client.windowresources;

import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.Widget;

import java.util.HashMap;

/**
 * Created by IntelliJ IDEA.
 * Author: C. K. Sidu Ponnappa
 * Date: Nov 21, 2006
 * Time: 10:44:34 PM
 * ThoughtWorks India Pvt. Ltd.
 */
public class ElementToWidgetMap extends HashMap {
    public Object put(Widget value) {
        return super.put(value.getElement(), value);
    }

    public Widget get(Element key) {
        Object o = super.get(key);
        if(o == null) return null;
        return (Widget) o;
    }
}
